
package com.jf.cloud.supplier.controller.admin;

import com.jf.cloud.common.response.ServerResponseEntity;
import com.jf.cloud.supplier.service.SupplierDetailService;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zz
 * @Date 2021/8/14 16:45
 */
@RestController("adminSupplierDetailController")
@RequestMapping("/mp/supplier_detail")
@Tag(name = "admin-供应商店铺信息")
public class SupplierDetailController {

    @Autowired
    private SupplierDetailService supplierDetailService;

    @GetMapping("/check_supplier_shop_name")
    @Operation(summary = "检查供应商店铺名称是否已存在" , description = "检查供应商店铺名称是否已存在")
    public ServerResponseEntity<Boolean> checkSupplierName(@RequestParam(value = "supplierName") String supplierName) {
        Boolean res = supplierDetailService.checkSupplierName(supplierName);
        return ServerResponseEntity.success(res);
    }

}
